package com.example.mvc.service;

import com.example.common.pojo.MyEntity;
import com.example.common.service.TestService;
import com.example.common.utils.Statistics;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

/**
 * <p>
 *     {@link org.springframework.web.servlet.mvc.method.annotation.JsonViewRequestBodyAdvice}
 *     {@link org.springframework.web.servlet.mvc.method.annotation.JsonViewResponseBodyAdvice}
 * </p>
 */
@Slf4j
@Lazy
@Service
public class MVCTestService implements TestService {

    private MVCTestService(){
        Statistics.logInfo(log);
    }

    private MyEntity showHome(){
        Statistics.logInfo(log, "showHome", "");
        MyEntity home = new MyEntity();
        home.setStudentName("爱你");
        return home;
    }

    @Override
    public Object doTest(Object param) {
        return showHome();
    }
}
